//
//  SoundManager.cpp
//  Frog Jump
//
//  Created by Tri Vo on 7/25/13.
//
//

#include "SoundManager.h"

USING_NS_CC;
using namespace CocosDenshion;

SoundManager *SoundManager::mInstance = NULL;
SoundManager *SoundManager::getInstance() {
    if (!mInstance) {
        mInstance = new SoundManager();
    }
    return mInstance;
}

SoundManager::~SoundManager() {
    
}

void SoundManager::playBGM(const char* pszFileName, bool isLoop) {
    SimpleAudioEngine::sharedEngine()->playBackgroundMusic(pszFileName, isLoop);
}

void SoundManager::playSound(const char* pszFileName, bool isLoop) {
    SimpleAudioEngine::sharedEngine()->playEffect(pszFileName, isLoop);
}

void SoundManager::stopAllMusic() {
    SimpleAudioEngine::sharedEngine()->stopBackgroundMusic();
}

void SoundManager::stopAllSound() {
    SimpleAudioEngine::sharedEngine()->stopAllEffects();
}
